

<div class="info">
<h1 class="font_h1">Tạo mới damh mục tin</h1>
<?php if(isset($error))  : ?>
<h2 class="error_red"><?php echo $error;?></h2>
<?php endif;?>
<form id="frm_add" action="<?php echo base_url().'admin/news/add_update/'.@$uid?>" method="POST">
<table class="table1">
    <tr>
                <td width="20%">Tên danh mục(Tiếng việt)</td>
                <td width="80%">
                	<?php if(isset($show->name_cat)) {?>
                    <input type="text" name="txt_name_cat" style="width:320px;" value="<?php echo $show->name_cat?>" />
                    <?php } else { ?>
                    <input type="text" name="txt_name_cat" style="width:320px;" value="<?php set_value('txt_name_cat')?>" />
                    <?php } ?>
                </td>
    </tr>   
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_name_cat');?></span>
                </td>
    </tr> 
      
     <tr>
                <td width="20%">Thứ tự</td>
                <td width="80%">
                	<?php if(isset($show->order_news)) {?>
                    <input type="text" name="txt_order" style="width:320px;" value="<?php echo $show->order_news?>" />
                    <?php } else { ?>
                    <input type="text" name="txt_order" style="width:320px;" value="<?php set_value('txt_order')?>" />
                    <?php } ?>
                </td>
    </tr>
    
    <tr>
                <td width="20%">Hiện thị</td>
                <td width="80%">
                <select name="txt_active">            
                	<option value="1" <?php echo set_select('txt_active',1)?>
    				<?php if(@$show->active == 1) echo "selected";?>>Có</option>
                    <option value="0" <?php echo set_select('txt_active',0)?>
                    <?php if(@$show->active == 0) echo "selected";?>>Không</option>
                </select>
                </td>
    </tr>
    <tr>
                <td width="20%"></td>
                <td width="80%">
                <a  class="button" onclick="$('#frm_add').submit()" href="javascript:void(0)">Lưu lại</a>
                 <a  class="button" href="<?php echo base_url().'admin/news/'?>">Quay lại</a>
                </td>
    </tr>
</table>
</form>
</div>